import Vue from 'vue'
import Element from 'element-ui'
import './assets/styles/element-variables.scss'
import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import App from './App'
import store from './store'
import router from './router'
import plugins from './plugins' // plugins
import { download } from '@/utils/request'
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, successTip } from "@/utils/ruoyi";
// // 富文本组件
// import Editor from "@/components/Editor"
// // 文件上传组件
// import FileUpload from "@/components/FileUpload"
// // 图片上传组件
// import ImageUpload from "@/components/ImageUpload"
// // 图片预览组件
// import ImagePreview from "@/components/ImagePreview"
// 分页组件
import Pagination from "@/components/Pagination";
// 输入框组件
import SearchInput from "@/components/SearchInput"
// 保存成功提示
import SuccessTip from "@/components/SuccessTip"
// 网络错误提示
import NetworkError from "@/components/NetworkError"
// echarts 折线图
import LineChart from '@/components/echarts/LineChart'
// echarts 柱状图
import BarChart from '@/components/echarts/BarChart'
// 环形图
import Doughnut from '@/components/echarts/Doughnut'

import Upload from '@/components/Upload'

// 全局方法挂载
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.successTip = successTip

// 全局组件挂载
// Vue.component('Editor', Editor)
// Vue.component('FileUpload', FileUpload)
// Vue.component('ImageUpload', ImageUpload)
// Vue.component('ImagePreview', ImagePreview)
Vue.component('Pagination', Pagination)
Vue.component('SearchInput', SearchInput)
Vue.component('SuccessTip', SuccessTip)
Vue.component('NetworkError', NetworkError)
Vue.component('LineChart', LineChart)
Vue.component('BarChart', BarChart)
Vue.component('Doughnut', Doughnut)

Vue.component('Upload', Upload)

Vue.use(plugins)

Vue.use(Element, {
  size: 'medium' // set element-ui default size
})

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
